package com.qu.waibao.my.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.qu.waibao.R;
import com.qu.waibao.base.BaseRecyclerAdapter;
import com.qu.waibao.bean.Jifen;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @描述 describe
 * @作者 Administrator
 * @创建时间 2018/7/24 15:32
 * @邮箱 1123599561@qq.com
 */
public class JifenAdapter extends BaseRecyclerAdapter<Jifen.JfDetaillistBean> {
    public JifenAdapter(Context context, int mode) {
        super(context, mode);
    }

    @Override
    protected RecyclerView.ViewHolder onCreateDefaultViewHolder(ViewGroup parent, int type) {
        return new JifenViewHolder(mInflater.inflate(R.layout.jifen_recycler_item,parent,false));
    }

    @Override
    protected void onBindDefaultViewHolder(RecyclerView.ViewHolder holder, Jifen.JfDetaillistBean item, int position) {
        JifenViewHolder jifenViewHolder = (JifenViewHolder) holder;
        jifenViewHolder.tv_time.setText(item.getCreatedate());
        jifenViewHolder.tv_type.setText(item.getRemark());
        jifenViewHolder.tv_jifen.setText(item.getOptjf());
    }
    class  JifenViewHolder extends RecyclerView.ViewHolder{
         @BindView(R.id.tv_type)
         TextView tv_type;
        @BindView(R.id.tv_time)
        TextView tv_time;
        @BindView(R.id.tv_jifen)
        TextView tv_jifen;
        public JifenViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this,itemView);
        }
    }
}
